<%@page pageEncoding="UTF-8" contentType="text/html; charset=UTF-8"%>
<%@include file="/common/common.jsp"%>
<%@ taglib uri="http://eos.primeton.com/tags/dict" prefix="d"%>
<html>
<title>当前房态</title>
<style>
   *{
	  font-family:微软雅黑;	
	  font-size:12px;	
   }
	  	
   .roomstates{
     
   }
   
   .tdbig{
     width:97px;
     height:76px;
   }

   .stbig{
     width:97px;
     height:76x;
     overflow:hidden;
word-wrap:break-word; 
word-spacing:normal; 
cursor:pointer;
   }
   
   .sttip{
     width:45px;
     height:34px;
     cursor:pointer;
   }
   
   .stvc{
     background:url(OrderMgr/roomstimg/roomstatusvc.png);
   }
   
   .stea{
     background:url(OrderMgr/roomstimg/roomstatusea.png);
   }
      
   .sted{
     background:url(OrderMgr/roomstimg/roomstatused.png);
   }
        
   .stoc{
     background:url(OrderMgr/roomstimg/roomstatusoc.png);
   }
       
   .stod{
     background:url(OrderMgr/roomstimg/roomstatusod.png);
   }
     
   .stoo{
     background:url(OrderMgr/roomstimg/roomstatusoo.png);
   }
           
   .stooo{
     background:url(OrderMgr/roomstimg/roomstatusooo.png);
   }
   
   .stcd{
     background:url(OrderMgr/roomstimg/roomstatuscd.png);
   }
         

   
   .stdbigvc{
   	 background:url(OrderMgr/roomstimg/roomstatusvcbig.png);
   }
   
   .detailIinfo{
      	
   }
        
   .memo{
     width:140px;
   }
   
   

.txt{ 
color:#005aa7; 
border-bottom:1px solid #005aa7; /* 下划线效果 */ 
border-top:0px; 
border-left:0px; 
border-right:0px; 
background-color:transparent; /* 背景色透明 */ 
} 
   
.s_btn {
	-webkit-box-shadow:rgba(0,0,0,0.0.1) 0 1px 0 0;
	-moz-box-shadow:rgba(0,0,0,0.0.1) 0 1px 0 0;
	box-shadow:rgba(0,0,0,0.0.1) 0 1px 0 0;
	background-color:#5B74A8;
	border:1px solid #29447E;
	font-family:'Lucida Grande',Tahoma,Verdana,Arial,sans-serif;
	font-size:12px;
	font-weight:700;
	height:28px;
	color:#fff;
	border-radius:5px;
	-moz-border-radius:5px;
	-webkit-border-radius:5px
}


.tdVC{
  background:url("OrderMgr/roomstimg/roomstatusvcbig.png") no-repeat scroll 0 0 transparent !important;
}

.tdEA{
  background:url("OrderMgr/roomstimg/roomstatuseabig.png") no-repeat scroll 0 0 transparent !important;
}

.tdOC{
  background:url("OrderMgr/roomstimg/roomstatusocbig.png") no-repeat scroll 0 0 transparent !important;
}

.tdOD{
  background:url("OrderMgr/roomstimg/roomstatusodbig.png") no-repeat scroll 0 0 transparent !important;
}

.tdED{
  background:url("OrderMgr/roomstimg/roomstatusedbig.png") no-repeat scroll 0 0 transparent !important;
}

.tdCD{
  background:url("OrderMgr/roomstimg/roomstatuscdbig.png") no-repeat scroll 0 0 transparent !important;
}

.tdOOO{
  background:url("OrderMgr/roomstimg/roomstatusooobig.png") no-repeat scroll 0 0 transparent !important;
}

.tdOO{
  background:url("OrderMgr/roomstimg/roomstatusoobig.png") no-repeat scroll 0 0 transparent !important;
}

.ipt{
  width:120px;
}
</style>

<script src="OrderMgr/script/jquery-1.7.2.min.js"></script>

<%
  String ua = request.getHeader( "User-Agent" );
  boolean isMSIE = ( ua != null && ua.indexOf( "MSIE" ) != -1 );
  if (isMSIE==true){

%>
<script type="text/javascript" src="OrderMgr/script/json2.js"></script>  
  
<%} %> 

<script>
   
   var gRooms = [], 
       gPage = {
         begin:0,
         length:70,
         count:0,
         isCount:true
       }, 
       gCond = {}, 
       gIdx = -1,
       statusType= "";
       
function prepairStatusCond(cond){
   if (statusType == "VC"){
     cond._expr[14] = {};
     cond._expr[15] = {};
     cond._expr[16] = {};
     cond._expr[17] = {};
     cond._expr[14].croomstatus = "V";
     cond._expr[15].chkstatus = "V";
     cond._expr[16].cclstatus = "C";
     cond._expr[17].prvArrive = 0;
   }else if (statusType == "EA"){
     cond._expr[14] = {};
     cond._expr[14].prvArrive = 0;
     cond._expr[14]._op = ">";
   }else if (statusType == "OC"){
     cond._expr[14] = {};
     cond._expr[15] = {};
     cond._expr[16] = {};   
     cond._expr[14].croomstatus = "O";
     cond._expr[15].chkstatus = "V";
     cond._expr[16].cclstatus = "C";
   }else if (statusType == "OD"){
     cond._expr[14] = {};
     cond._expr[15] = {};
     cond._expr[16] = {};   
     cond._expr[14].croomstatus = "O";
     cond._expr[15].chkstatus = "V";
     cond._expr[16].cclstatus = "I";
   }else if (statusType == "ED"){
     cond._expr[14] = {};
     cond._expr[14].preLeave = 0;
     cond._expr[14]._op = ">";     
   }else if (statusType == "CD"){
     cond._expr[14] = {};
     cond._expr[15] = {};
     cond._expr[16] = {};   
     cond._expr[14].croomstatus = "V";
     cond._expr[15].chkstatus = "V";
     cond._expr[16].cclstatus = "D";
   }else if (statusType == "OO"){
     cond._expr[14] = {};
     cond._expr[14].chkstatus = "R";
   }else if (statusType == "OOO"){
     cond._expr[14] = {};
     cond._expr[14].chkstatus = "S";
   }
   return cond;
}
   
function stringToDate(X, C) {
    var I = new Date();
    if (!X || X == "") return I;
    if (!C || C == "") C = "yyyy-MM-dd";
    var E = C.replace(/[^y|Y]/g, ""),
        G = C.replace(/[^M]/g, ""),
        N = C.replace(/[^d]/g, ""),
        Q = C.indexOf(E),
        W = E.length,
        S = X.substring(Q, Q + W) * 1;
    if (W == 2) if (S < 50) S += 2000;
    else S += 1900;
    var R = C.indexOf(G),
        H = X.substring(R, R + G.length) * 1 - 1,
        K = C.indexOf(N),
        J = X.substring(K, K + N.length) * 1,
        T = C.replace(/[^H]/g, ""),
        L = C.replace(/[^h]/g, ""),
        U = C.replace(/[^m]/g, ""),
        F = C.replace(/[^S|s]/g, ""),
        P = 0;
    if (T && T != "") {
        var O = C.indexOf(T);
        if (O > -1) P = X.substring(O, O + T.length)
    }
    if (L && L != "") {
        var A = C.indexOf(L);
        if (A > -1) P = X.substring(A, A + L.length)
    }
    var V = 0;
    if (U && U != "") {
        var B = C.indexOf(U);
        if (B > -1) V = X.substring(B, B + U.length)
    }
    var M = 0;
    if (F && F != "") {
        var D = C.indexOf(F);
        if (D > -1) M = X.substring(D, D + F.length)
    }
    return new Date(S, H, J, P, V, M)
}

   function getRoomBOState(ety){
      var r = ety.croomstatus, 
          c = ety.chkstatus, 
          l = ety.cclstatus, 
          pa = ety.prvArrive, 
          pl = ety.preLeave;
          
          vc = (r == "V" && c == "V" && l == "I") ? "VC" : "",
          ea = pa > 0 ? "EA" : "",
          oc = (r == "O" && c == "V" && l == "C") ? "OD" : "",
          od = (r == "O" && c == "V" && l == "I") ? "OC" : "",
          ed = pl > 0 ? "ED" : "",
          cd = (r == "V" && c == "V" && l == "D") ? "CD" : "",
          oo = c == "R" ? "OO" : "",
          ooo = c == "S" ? "OOO" : "";
          
      return ea || vc || ed || oc || od || ooo || oo || cd || "OT";
      
   }
   
   function renderRooms(){
     
     $(".tdbig").attr("class", "tdbig").addClass("tdblank");
     $(".stbig").text("");
     var len = gRooms.length;
     for(var i = 0; i < len; i++){
       var r = $("#cell" + (i + 1));
       r.text((gRooms[i].careaname || "") + " " + (gRooms[i].cbuilding || "") + " " + gRooms[i].croomno);
       r.parent().removeClass("tdblank").addClass("td" + getRoomBOState(gRooms[i]));
     }
   }
   
   function showTotal(total){
      $(".spico").text("0");
      for(p in total){
        if (total[p]){
          $("#sp" + p).text(total[p]);
        }
      }
   }
   function queryRooms(summary, getCond){
       var params = getCond();
       //查询满足条件的房间
       $.ajax({
       	url:          "com.hms.roomfoundation.roomstates.queryStateRooms.biz.ext",
       	type:         "POST",
       	async:        true,
       	contentType:  "application/json; charset=utf-8",
       	data:         params,
       	success:      function(data){
       	  if (data.exception){
       	    alert("执行查询时发生错误!");
       	    return;
       	  }
       	  
       	  if (data.page){//设置分页
       	    $.extend(gPage, data.page);
       	  }
       	  
       	  if (data.rooms){//设置分页条件
       	    gRooms = data.rooms;
       	  }else{
       	    gRooms = [];
       	  }

      $("input[type='text']").val("");
      $("textarea").val("");   
      $("select").val(""); 
      
       	  //渲染数据
       	  renderRooms();
       	  
       	  if (summary == "Y"){
       	    showTotal(data.total);
       	  }
       	  
       	  //显示详细信息
       	  gIdx = gRooms.length == 0 ? -1 : 0;
       	  showInfo(gIdx);

       	},
       	error:        function(){alert("执行查询时发生错误!");}
       });    
   }
   
   
   function prepairCond(){
      var cond = {
        _expr:[
          {careaname:$("#careaname").val(), _op:"like"},
          {cbuilding:$("#cbuilding").val(), _op:"like"},
          {croomno:$("#croomno").val(), _op:"like"},
          {croomcode:$("#croomcode").val(), _op:"like"},
          {croomtype:$("#croomtype").val()},
          {croomstyle:$("#croomstyle").val()},
          {gdarea:$("#gdarea").val(), _op:"like"},
          {bzarea:$("#bzarea").val(), _op:"like"},
          {iroomnumbers:$("#iroomnumbers").val()},
          {cookspace:$("#cookspace").val()},
          {isweb:$("#isweb").val()},
          {isaddbed:$("#isaddbed").val()},
          {waitername:$("#waitername").val(), _op:"like"},
          {housekeepername:$("#housekeepername").val(), _op:"like"}          
        ]
      };
      
      return cond;
   }
      
   function filterStatus(state){
     //按照条件进行过滤
   }
   
   function showInfo(idx){//显示房间详细信息
     if (idx == -1){
       return;
     }

              $("#careaname").val("");
              $("#cbuilding").val("");
              $("#croomno").val("");
              $("#croomcode").val("");
              $("#croomtype").val("");
              $("#croomstyle").val("");
              $("#gdarea").val("");
              $("#bzarea").val("");
              $("#iroomnumbers").val("");
              $("#cookspace").val("");
              $("#isweb").val("");
              $("#isaddbed").val("");
              $("#waitername").val("");
              $("#housekeepername").val("");

              $("#corderno").val("");
              $("#orderstatus").val("");
              $("#cbookname").val("");
              $("#cbooktel").val("");
              $("#cgresno").val("");
              $("#cstatus").val("");
              $("#arrdate").val("");
              $("#leftdata").val("");
              $("#cguestname").val("");
              $("#cmobile").val("");
              
              $("#aloan").val("");
              $("#aselfuse").val("");
              $("#amsg").val("");
              $("#ahalf").val("");
              $("#astorage").val("");
              $("#plan").val("");

                            
                                       
     var obj = gRooms[idx];
     for(p in obj){
       var d = $("#" + p);
       if (d.length > 0){
          d.val(obj[p] || "");
       }
     }
     
     if (gRooms[idx].cstatus == "I"){//如果是入住，就显示抵店日期和预计离店
         $("#tdarr").text("抵店日期");
         $("#tdleft").text("预计离店");
         $("#arrdate").val(gRooms[idx].darrdate || "");
         $("#leftdate").val(gRooms[idx].deporigdate || "");
         var tk = "送机时间:" + (gRooms[idx].dseeoffdate || "") + "送机地点:" + (gRooms[idx].cseeoffaddress || "");
         if (tk == "送机时间:送机地点:"){
           $("#plan").val("无接送机要求");   
         }else{
           $("#plan").val(tk);         
         }
     }else if (gRooms[idx].cstatus == "R"){//如果是预订，就显示预抵日期和预离日期
         $("#tdarr").text("预计抵店");
         $("#tdleft").text("预计离店");
         $("#arrdate").val(gRooms[idx].darrdate || "");
         $("#leftdate").val(gRooms[idx].deporigdate|| "");
         var tk = "接机时间:" +  (gRooms[idx].dpickupdate || "") + ", 接机地点:" + (gRooms[idx].cseeoffaddress || "") + "送机时间:" + (gRooms[idx].dseeoffdate || "") + "送机地点:" + (gRooms[idx].cseeoffaddress || "");
         if (tk == "接机时间:, 接机地点:送机时间:送机地点:"){
           $("#plan").val("无接送机要求");   
         }else{
           $("#plan").val(tk);         
         } 
     }else{
        $("#plan").val("无接送机要求");
     }
     
     if (gRooms[idx].igresid){
         //刷新附加信息
         var p = {
           roomid:gRooms[idx].iroomid,
           gresid:gRooms[idx].igresid
         }
         $.ajax({
           url:          "com.hms.OrderMgr.roomstatus.queryRoomAttaches.biz.ext",
           type:         "POST",
           async:        true,
           contentType:  "application/json; charset=utf-8",
           data:         JSON.stringify(p),
           success:      function(data){
             if (data.exception){
               alert("执行查询时发生错误!");
               return;
             }
             
             //获取
             $("#aloan").val(data.loan || "无租借信息");
             $("#aselfuse").val(data.selfuse || "无自住信息");
             $("#amsg").val(data.msg || "无留言信息");
             $("#ahalf").val(data.msg || "无半日租信息");
             $("#astorage").val(data.storage || "无物品寄存");       
             $("#astorage").val(data.storage || "无物品寄存");             
           },
       	   error:        function(){alert("查询房间附加信息时发生错误!");}
         }); 
     }      
   }
      
   function first(){//跳转到第一页
     if (gRooms.length == 0 || gPage.count == 0 || gPage.begin == 0){
       return;
     }
     
     queryRooms("N", function(){
        var param = {
          page:{begin:0,
                length:gPage.length,
                isCount:true},
         criteria:prepairStatusCond($.extend({}, gCond)),
         summary:"N"
        };
        return JSON.stringify(param);
     });
   }
   
   function last(){
     if (gPage.count == 0 || gPage.begin + gPage.length >= gPage.count){
       return;
     }
     
     queryRooms("N", function(){
        var param = {
          page:{begin:gPage.count - gPage.length < 0 ? 0 : gPage.count - gPage.length,
                length:gPage.length,
                isCount:true},
         criteria:prepairStatusCond($.extend({}, gCond)),
         summary:"N"
        };
        return JSON.stringify(param);
     });
   }
   
   function prev(){
     if (gPage.count == 0 || gPage.begin == 0){
       return;
     }
     
     queryRooms("N", function(){
        var param = {
          page:{begin:gPage.begin - gPage.length < 0 ? 0 : gPage.begin - gPage.length,
                length:gPage.length,
                isCount:true},
         criteria:prepairStatusCond($.extend({}, gCond)),
         summary:"N"
        };
        return JSON.stringify(param);
     });
   }
   
   function next(){
     if (gPage.count == 0 || gPage.begin + gPage.length >= gPage.count){
       return;
     }
     
     queryRooms("N", function(){
        var param = {
          page:{begin:gPage.begin + gPage.length,
                length:gPage.length,
                isCount:true},
         criteria:prepairStatusCond($.extend({}, gCond)),
         summary:"N"
        };
        return JSON.stringify(param);
     });
   }
      
   function checkIn(){
   
   }
   
   function book(){
   
   }
   
   function checkOut(){
   
   }
   
   function checkRoom(){
   
   }
   
   function lockRoom(){
   
   }
   
   function unlockRoom(){
   
   }
      
   function setRoomMgr(){
     //设置房屋管家
     var waiter = $("#housekeepername").val();
     if (!waiter){
        alert("请指定管家!");
        return;
     }
     
     if (gIdx == -1){
       return;
     }

     if (gRooms[gIdx].housekeepername == waiter){
       alert("没有修改房屋管家,不需要保存!");
       return;
     }
     
     setRoomAttribute("com.hms.roomfoundation.roomstates.setHouseKeeper.biz.ext", waiter, function(data){
        if (data.ic != 1){
           alert("指定的管家" + waiter + "未在系统中记录，请与管理员联系");
           return;
        }
        gRooms[gIdx].housekeepername = waiter;

     });      
   }

   function setRoomWaiter(){
     //设置房屋管家
     var waiter = $("#waitername").val();
     if (!waiter){
        alert("清指定房间服务人员!");
        return;
     }
     
     if (gIdx == -1){
       return;
     }
     
     if (gRooms[gIdx].waitername == waiter){
       alert("没有修改房间服务人员,不需要保存!");
       return;
     }
     
     setRoomAttribute("com.hms.roomfoundation.roomstates.setWaiter.biz.ext", waiter, function(data){
        if (data.ic != 1){
           alert("指定的房间服务人员" + waiter + "未在系统中记录，请与管理员联系");
           return;
        }     
       gRooms[gIdx].waitername = waiter;
     }); 
   }
   
   function setRoomAttribute(url, uname, callback){//设置房屋属性
      var param = {
         _url:url,
         _params:{
           room:{
             iroomid:gRooms[gIdx].iroomid
           },
           username:uname
         },
         handler:callback
      }
      
     //查询满足条件的房间
     $.ajax({
       	url:          param._url,
       	type:         "POST",
       	async:        true,
       	contentType:  "application/json; charset=utf-8",
       	data:         JSON.stringify(param._params),
       	success:      function(data){
       	  if (data.exception){
       	    alert("执行查询时发生错误!");
       	    return;
       	  }
       	  
       	  if (data.ic == 1){
       	    alert("设置成功!");
       	  }
       	  
       	  if (param.handler){
       	    param.handler(data);
       	  }
       	},
       	error:        function(){alert("执行操作时发生错误!");}
     }); 
   }
      
      
   function scheduleRoomQuery(){
     //远期房态查询
   }
   

   $(document).ready(function(){
   
       //按照条件查询
       $("#btnQuery").bind("click", function(){
         statusType = "";
         queryRooms("Y", 
            function(){
              var p = {};
              gCond = prepairCond();
              p.criteria = gCond;
              p.summary = "Y";
              p.page = {
                begin:0,
                length:70,
                isCount:true
              };
              return JSON.stringify(p);
            }
         );
       });
             
       $(".tdbig").bind("click", function(){
         var self = $(this),
             id = self.find("div").attr("id");
             
         if (self.hasClass("tdblank")){
           return false;
         }
         
         
         
         var idx = id.substring(4) * 1;
         gIdx = idx-1;
         
    
         //显示属性
         showInfo(idx-1);
       }); 
       
       $("#btnReset").bind("click", function(){
              $("#careaname").val("");
              $("#cbuilding").val("");
              $("#croomno").val("");
              $("#croomcode").val("");
              $("#croomtype").val("");
              $("#croomstyle").val("");
              $("#gdarea").val("");
              $("#bzarea").val("");
              $("#iroomnumbers").val("");
              $("#cookspace").val("");
              $("#isweb").val("");
              $("#isaddbed").val("");
              $("#waitername").val("");
              $("#housekeepername").val("");
       });  
       
       $("#btnSetWaiter").bind("click", function(){
         setRoomWaiter();
       });
       
       $("#btnSetMgr").bind("click", function(){
         setRoomMgr();
       });
       
       /*****
       $("#btnctrl").bind("click", function(){
         var start = $("#startdate").val(), enddate = $("#enddate").val();
         
         try{
         
         //转换时间
         if (!start || !enddate){
            alert("必须指定日期范围条件");
            return false;
         }
         
         var x = stringToDate(start, 'yyyy-MM-dd'),
             y = stringToDate(enddate, 'yyyy-MM-dd');
         if (y.getTime() < x.getTime()){
           alert("结束日期必须大于开始日期");
           return false;
         }
         
         if ((y - x) > 20 * 24 * 60 * 60 * 1000){
           alert("最多允许查询20天内的房控图");
           return false;
         }
         }catch(e){
           alert("请检查日期格式是否正确[日期格式为YYYY-MM-DD]!");
           return;
         }
         //判断时间间隔
         
         //如果都正确，打开远期房态
         window.open("com.hms.report.roomctrlview.flow?startDate=" + start + "&endDate=" + enddate);
       });
       ****/
       
       $(".sttip").bind("click", function(){
          if (gRooms.length == 0 && statusType == ""){
            return;
          }
          var self = $(this);
          statusType = self.attr("id");
          queryRooms("N", 
            function(){
              var p = {};
              p.criteria = prepairStatusCond($.extend({}, gCond));
              p.summary = "N";
              p.page = {
                begin:0,
                length:70,
                isCount:true
              };
              return JSON.stringify(p);
            }
          );
          
       });
      
      $("input[type='text']").val("");
      $("textarea").val("");   
      $("select").val("");          
      $("#btnQuery").click(); 
   });
</script>

<body>

<table>
    <tr>
        <td valign="top">
        	<table>
        	  <tr>
        	  	<td border="1">
                        <fieldset name="Group1">
                            <legend>
                                房间列表
                            </legend>        	  	
        	  	  <table class="roomstates">
        	  	     <tr>
        	  	        <td class="tdbig tdblank"><div class="stbig" id="cell1"></div></td>	
        	  	        <td class="tdbig tdblank"><div class="stbig" id="cell2"></div></td>	
        	  	        <td class="tdbig tdblank"><div class="stbig" id="cell3"></div></td>	
        	  	        <td class="tdbig tdblank"><div class="stbig" id="cell4"></div></td>	
        	  	        <td class="tdbig tdblank"><div class="stbig" id="cell5"></div></td>	
        	  	        <td class="tdbig tdblank"><div class="stbig" id="cell6"></div></td>	
        	  	        <td class="tdbig tdblank"><div class="stbig" id="cell7"></div></td>	
        	  	        <td class="tdbig tdblank"><div class="stbig" id="cell8"></div></td>	
        	  	        <td class="tdbig tdblank"><div class="stbig" id="cell9"></div></td>		  	                	  	                	  	          	  	        		  	                	  	                	  	          	  	        	
        	  	        <td class="tdbig tdblank"><div class="stbig" id="cell10"></div></td>		  	                	  	                	  	          	  	        		  	                	  	                	  	          	  	        	        	  	        
        	  	     </tr>
        	  	     <tr>
        	  	        <td class="tdbig tdblank"><div class="stbig" id="cell11"></div></td>	
        	  	        <td class="tdbig tdblank"><div class="stbig" id="cell12"></div></td>	
        	  	        <td class="tdbig tdblank"><div class="stbig" id="cell13"></div></td>	
        	  	        <td class="tdbig tdblank"><div class="stbig" id="cell14"></div></td>	
        	  	        <td class="tdbig tdblank"><div class="stbig" id="cell15"></div></td>	
        	  	        <td class="tdbig tdblank"><div class="stbig" id="cell16"></div></td>	
        	  	        <td class="tdbig tdblank"><div class="stbig" id="cell17"></div></td>	
        	  	        <td class="tdbig tdblank"><div class="stbig" id="cell18"></div></td>	
        	  	        <td class="tdbig tdblank"><div class="stbig" id="cell19"></div></td>	
        	  	        <td class="tdbig tdblank"><div class="stbig" id="cell20"></div></td>        	  	        	  	                	  	                	  	          	  	        		  	                	  	                	  	          	  	        	
        	  	     </tr>
        	  	     <tr>
	
        	  	        <td class="tdbig tdblank"><div class="stbig" id="cell21"></div></td>	
        	  	        <td class="tdbig tdblank"><div class="stbig" id="cell22"></div></td>	
        	  	        <td class="tdbig tdblank"><div class="stbig" id="cell23"></div></td>	
        	  	        <td class="tdbig tdblank"><div class="stbig" id="cell24"></div></td>	
        	  	        <td class="tdbig tdblank"><div class="stbig" id="cell25"></div></td>	
        	  	        <td class="tdbig tdblank"><div class="stbig" id="cell26"></div></td>	
        	  	        <td class="tdbig tdblank"><div class="stbig" id="cell27"></div></td>	
        	  	        <td class="tdbig tdblank"><div class="stbig" id="cell28"></div></td>	
        	  	        <td class="tdbig tdblank"><div class="stbig" id="cell29"></div></td>	
        	  	        <td class="tdbig tdblank"><div class="stbig" id="cell30"></div></td>	        	  	        	  	                	  	                	  	          	  	        	
        	  	     </tr>
        	  	     <tr>

        	  	        <td class="tdbig tdblank"><div class="stbig" id="cell31"></div></td>	
        	  	        <td class="tdbig tdblank"><div class="stbig" id="cell32"></div></td>	
        	  	        <td class="tdbig tdblank"><div class="stbig" id="cell33"></div></td>	
        	  	        <td class="tdbig tdblank"><div class="stbig" id="cell34"></div></td>	
        	  	        <td class="tdbig tdblank"><div class="stbig" id="cell35"></div></td>	
        	  	        <td class="tdbig tdblank"><div class="stbig" id="cell36"></div></td>
        	  	        <td class="tdbig tdblank"><div class="stbig" id="cell37"></div></td>	
        	  	        <td class="tdbig tdblank"><div class="stbig" id="cell38"></div></td>	
        	  	        <td class="tdbig tdblank"><div class="stbig" id="cell39"></div></td>	
        	  	        <td class="tdbig tdblank"><div class="stbig" id="cell40"></div></td>	        	  	        		  	                	  	                	  	          	  	        	
	  	                	  	                	  	          	  	        	
        	  	     </tr>
        	  	     <tr>

        	  	        <td class="tdbig tdblank"><div class="stbig" id="cell41"></div></td>	
        	  	        <td class="tdbig tdblank"><div class="stbig" id="cell42"></div></td>	
        	  	        <td class="tdbig tdblank"><div class="stbig" id="cell43"></div></td>	
        	  	        <td class="tdbig tdblank"><div class="stbig" id="cell44"></div></td>	
        	  	        <td class="tdbig tdblank"><div class="stbig" id="cell45"></div></td>	
        	  	        <td class="tdbig tdblank"><div class="stbig" id="cell46"></div></td>	
        	  	        <td class="tdbig tdblank"><div class="stbig" id="cell47"></div></td>	
        	  	        <td class="tdbig tdblank"><div class="stbig" id="cell48"></div></td>	
        	  	        <td class="tdbig tdblank"><div class="stbig" id="cell49"></div></td>	
        	  	        <td class="tdbig tdblank"><div class="stbig" id="cell50"></div></td>	        	  	        	  	                	  	                	  	          	  	        	
	  	                	  	                	  	          	  	        	
        	  	     </tr>
        	  	     <tr>

        	  	        <td class="tdbig tdblank"><div class="stbig" id="cell51"></div></td>	
        	  	        <td class="tdbig tdblank"><div class="stbig" id="cell52"></div></td>	
        	  	        <td class="tdbig tdblank"><div class="stbig" id="cell53"></div></td>	
        	  	        <td class="tdbig tdblank"><div class="stbig" id="cell54"></div></td>	
        	  	        <td class="tdbig tdblank"><div class="stbig" id="cell55"></div></td>	
        	  	        <td class="tdbig tdblank"><div class="stbig" id="cell56"></div></td>	
        	  	        <td class="tdbig tdblank"><div class="stbig" id="cell57"></div></td>	
        	  	        <td class="tdbig tdblank"><div class="stbig" id="cell58"></div></td>	
        	  	        <td class="tdbig tdblank"><div class="stbig" id="cell59"></div></td>	
        	  	        <td class="tdbig tdblank"><div class="stbig" id="cell60"></div></td>	        	  	        	  	                	  	                	  	          	  	        	
	  	                	  	                	  	          	  	        	
        	  	     </tr>
        	  	     <tr>
        	  	        <td class="tdbig tdblank"><div class="stbig" id="cell61"></div></td>	
        	  	        <td class="tdbig tdblank"><div class="stbig" id="cell62"></div></td>	
        	  	        <td class="tdbig tdblank"><div class="stbig" id="cell63"></div></td>	
        	  	        <td class="tdbig tdblank"><div class="stbig" id="cell64"></div></td>	
        	  	        <td class="tdbig tdblank"><div class="stbig" id="cell65"></div></td>	
        	  	        <td class="tdbig tdblank"><div class="stbig" id="cell66"></div></td>	
        	  	        <td class="tdbig tdblank"><div class="stbig" id="cell67"></div></td>	
        	  	        <td class="tdbig tdblank"><div class="stbig" id="cell68"></div></td>	
        	  	        <td class="tdbig tdblank"><div class="stbig" id="cell69"></div></td>	
        	  	        <td class="tdbig tdblank"><div class="stbig" id="cell70"></div></td>	          	  	        	  	                	  	                	  	          	  	        		                	  	          	  	        	
        	  	     </tr>           	  	             	  	             	  	           	  	             	  	             	  	             	  	             	  	       	             	  	             	  	             	  	             	  	     	             	  	             	  	             	  	             	  	     
        	  	  </table>
        	  	  </fieldset>   
        	  	</td>
        	  </tr>
        	  
        	  <tr>
        	  	<td align="right">
                        <fieldset name="Group1">
                            <legend>
                                分页信息
                            </legend>
        	  	   <a href="#" onclick="first()">第一页</a>
        	  	   <a href="#" onclick="prev()">上一页</a>     	  		
        	  	   <a href="#" onclick="next()">下一页</a>     	  		
        	  	   <a href="#" onclick="last()">最后一页</a>  
                        </fieldset>   
                                	  	
   	  		        	  	           	  	           	  	        	  		
        	  	</td>
        	  </tr>
        	          	  
        	  <tr>
        	  	<td>
                        <fieldset name="Group1">
                            <legend>
                                实时房态统计
                            </legend>
                            <table class="stateicon">
                            	<tr>
                            	  <td align="center"><div class="sttip stvc" id="VC"> </div><div>干净房(VC):共<span class="spico" id="spvc">0</span>间</div></td>	
                            	  <td align="center"><div class="sttip stea" id="EA"> </div><div>预抵(EA):共<span class="spico" id="spea">0</span>间</div></td>
                            	  <td align="center"><div class="sttip stoc" id="OA"> </div><div>住客(OC):共<span class="spico" id="spoc">0</span>间</div></td>
                            	  <td align="center"><div class="sttip stod" id="OD"> </div><div>住客(OD):共<span class="spico" id="spod">0</span>间</div></td>
                            	  <td align="center"><div class="sttip sted" id="ED"> </div><div>预离(ED):共<span class="spico" id="sped">0</span>间</div></td>
                            	  <td align="center"><div class="sttip stcd" id="CD"> </div><div>脏房(CD):共<span class="spico" id="spcd">0</span>间</div></td>
                            	  <td align="center"><div class="sttip stooo" id="OOO"> </div><div>封房(OOO):共<span class="spico" id="spoooO">0</span>间</div></td>
                            	  <td align="center"><div class="sttip stoo" id="OO"> </div><div>临时态(OO):共<span class="spico" id="spoo">0</span>间</div></td>                            	  
                            	</tr>
                            </table>
                        </fieldset>        	  		
        	  	</td>
        	  </tr>
        	  

        	          	  
        	</table>
        </td>
        <td valign="top" align="left">
                         <fieldset name="Group1">
                            <legend>
                                房间信息&查询
                            </legend>
                            
<table class="detailIinfo">

	<tr  >
		<td  >小区</td>
		<td colspan="1" ><input type="text" class="txt ipt" id="careaname"></td>
		<td >栋座</td>
		<td colspan="1" ><input type="text" class="txt" id="cbuilding"></td>		
	</tr>

	<tr  >
		<td  >房号</td>
		<td ><input type="text" class="txt ipt" id="croomno"></td>
		<td  align="right">自编号</td>
		<td ><input type="text" class="txt" id="croomcode"></td>		
	</tr>
	<tr  >

	</tr>
	<tr  >
		<td >房型</td>
		<td >
		  <d:select dictTypeId="HMS_Room_Type" nullLabel="" styleClass="txt ipt" id="croomtype"/> 
		</td>
		<td align="right">房景</td>
		<td ><d:select dictTypeId="HMS_Room_Stlye" nullLabel="" styleClass="txt"  id="croomstyle"/> </td>
	</tr>
	<tr  >
		<td  >行政区</td>
		<td colspan="1" ><input type="text" class="txt ipt" id="gdarea"></td>
		<td  align="right">商业区</td>
		<td colspan="1" ><input type="text"   class="txt" id="bzarea"></td>		
	</tr>
	<tr  >
		<td  >洗手间</td>
		<td ><input type="text" class="txt ipt" id="iroomnumbers"></td>
		<td  align="right">厨房数</td>
		<td ><input type="text" 　  class="txt" id="cookspace"></td>
	</tr>
	<tr>
		<td  >有宽带</td>
		<td>
		  <select class="txt ipt" id="isweb">
		    <option value=""></option>
		    <option value="Y">有</option>
		    <option value="N">无</option>
		  </select>
		</td>
		<td align="right">可加床</td>
		<td>
		  <select class="txt" id="isaddbed" >
		    <option value=""></option>
		    <option value="Y">是</option>
		    <option value="N">否</option>
		  </select>
		</td>
	</tr>

                              <tr>
                                <td >房服</td>
                                <td><input type="text" class="txt ipt" id="waitername"></td>
                                <td  align="right">管家</td>
                                <td><input type="text" class="txt" id="housekeepername"></td>                                
                              </tr>
                              
	<tr>
		<td colspan="4">
		   <input type="button" value="查询房间"  class="s_btn" id="btnQuery">
		   <input type="button" value="重置条件"  class="s_btn" id="btnReset">
		   <input type="button" value="重设房服"  class="s_btn" id="btnSetWaiter">
		   <input type="button" value="重设管家"  class="s_btn" id="btnSetMgr">
		</td>
  	
	</tr>	
	<tr>		
		<td colspan="4">
                        <input type="button" value="快速入住" class="s_btn">
                        <input type="button" value="快速预订" class="s_btn">
                        <input type="button" value="快速退房" class="s_btn">
                        <input type="button" value="快速查房" class="s_btn">
		</td>
	</tr>		
	<tr>			
		<td colspan="4">
                        <input type="button" value="快速封房" class="s_btn" >
                        <input type="button" value="快速解封" class="s_btn">	 
		</td>		
	</tr>
		
</table>                            
                        </fieldset>

                         <fieldset name="Group4">
                            <legend>
                                订单&住客信息
                            </legend>
<table class="detailIinfo">
	<tr  >
		<td  style="width:70px;">预订单</td>
		<td ><input type="text" style="width:100px;" class="txt" id="corderno" readonly="true"></td>
		<td  style="width:70px;">状态</td>
		<td ><input type="text" style="width:100px;" class="txt" id="orderstatus" readonly="true"></td>		
	</tr>
	
	<tr  >
		<td  style="width:70px;">预订人</td>
		<td ><input type="text" style="width:100%;" class="txt" id="cbookname" readonly="true"></td>
		<td  style="width:70px;" >手机</td>
		<td ><input type="text" style="width:100%;" class="txt" id=cbooktel readonly="true"></td>		
	</tr>

	<tr  >
		<td  style="width:70px;">客单</td>
		<td ><input type="text" style="width:100%;" class="txt" id="cgresno" readonly="true"></td>
		<td  style="width:70px;" >状态</td>
		<td ><input type="text" style="width:100%;" class="txt" id="cstatus" readonly="true"></td>		
	</tr>

	<tr  >
		<td  style="width:70px;" id="tdarr">预抵日期</td>
		<td ><input type="text" style="width:100%;" class="txt" id="arrdate" readonly="true"></td>
		<td  style="width:70px;" id="tdleft">预离日期</td>
		<td ><input type="text" style="width:100%;" class="txt" id="leftdata" readonly="true"></td>		
	</tr>

	<tr  >
		<td  style="width:70px;">住客</td>
		<td ><input type="text" style="width:100%;" class="txt" id="cguestname" readonly="true"></td>
		<td  style="width:70px;" >手机</td>
		<td ><input type="text" style="width:100%;" class="txt" id="cmobile" readonly="true"></td>		
	</tr>
	
</table>
                        </fieldset>    

<!-- 
                         <fieldset name="Group2">
                            <legend>
                                远期房态查询
                            </legend>
                            <table >
                               <tr>
                                 <td  style="70px;">
                                    开始时间:
                                 </td>
                                 <td>
                                   <input type="text" id="startdate" 　style="width:100%;"  class="txt">
                                 </td>
                                 <td rowspan="2">
                                   <input type="button" id="btnctrl" value="确认查询" class="s_btn" style="width:100px;height:50px;" >
                                 </td>                                 
                               </tr>
                               <tr>
                                 <td  style="70px;">
                                   结束时间:
                                 </td> 
                                 <td> 
                                   <input type="text" id="enddate"　style="width:100%;"  class="txt">
                                 </td>                               
                               </tr>
                            </table>                            
                        </fieldset>
 -->
 
                         <fieldset name="Group5">
                            <legend>
                                附加信息
                            </legend>
                            <table style="width:100%">
                               <tr>
                                 <td  style="width:70px;">
                                    <img src="OrderMgr/roomstimg/loan.png" title="外借">
                                 </td>
                                 <td>
                                   <textarea type="text" style="width:115px;"  id="aloan"  class="txt"></textarea>   
                                 </td>     
                                 <td>
                                   <img src="OrderMgr/roomstimg/selfuse.png" title="自住">
                                 </td>     
                                 <td>
                                   <textarea type="text" style="width:115px;" id="aselfuse" class="txt"></textarea>   
                                 </td>                                                                                         
                               </tr>

                               <tr>
                                 <td  style="width:70px;">
                                    <img src="OrderMgr/roomstimg/message.png" title="留言">
                                 </td>
                                 <td>
                                    <textarea type="text" style="width:100%;" id="amsg" class="txt"></textarea>   
                                 </td>
                                 <td>
                                   <img src="OrderMgr/roomstimg/half.png" title="半日租">
                                 </td>     
                                 <td>
                                    <textarea type="text" style="width:100%;" id="ahalf"  class="txt"></textarea>   
                                 </td>                                  
                               </tr>                                 
                               <tr>
                                 <td  style="width:70px;">
                                    <img src="OrderMgr/roomstimg/store.png" title="寄存">
                                 </td>
                                 <td>
                                   <textarea type="text" style="width:100%;" id="astorage"  class="txt"></textarea>   
                                 </td>
                                 <td>
                                   <img src="OrderMgr/roomstimg/air.png" title="接送机">
                                 </td>     
                                 <td>
                                   <textarea type="text" style="width:100%;" id="plan" class="txt"></textarea>   
                                 </td>                                   
                               </tr>                                                                                                                      
                            </table>                            
                        </fieldset>                                  
                     
                                                
                        
        </td>
    </tr>
</table>



</body>

<html>
